package org.to_zero.ssm.sdm.mapper;

import org.apache.ibatis.annotations.Param;
import org.to_zero.ssm.sdm.entity.User;
import org.to_zero.ssm.sdm.entity.vo.ResponseEntity;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    List<User> findUserByCondition(@Param("user") User user);

    int findUserByConditionCount(User user);

    int deleteByPrimaryKeys(Integer[] ids);

    User login(@Param("username") String username, @Param("password") String password);

    int register(User user);

    int changePassword(@Param("id") Integer id,@Param("currentPassword") String currentPassword,@Param("password") String password);
}